import Vue from 'vue'
import Router from 'vue-router'
// import Hello from '@/components/Hello'
import HelloWorld from '@/components/Index'
import Register from '@/components/Register'
import Fnde from '@/components/Fnde'
import Chaxun from '@/components/Chaxun'
import Mian from '@/components/mian'
import Report from '@/components/Report'
import Me from '@/components/Me'
import Pinpai from '@/components/Pinpai'
import Remark from '@/components/Remark'
import Middle from '@/components/Middle'
import Rerror from '@/components/Rerror'
import Bohui from '@/components/Bohui'
import NO from '@/components/No'
import Buy from '@/components/buy'


Vue.use(Router);

export default new Router({
    // mode:'history',
  routes: [
      {
          path:"/chaxunMiddle",
          name:"chaxunMiddle",
          component:Middle
      },{
          path:"/buy",
          name:"buy",
          component:Buy
      },{
          path:"/chaxunRerror",
          name:"chaxunRerror",
          component:Rerror
      },{
          path:"/chaxunBohui"
          ,name:"chaxunBohui",
          component:Bohui
      },{
          path:"/chaxunNO"
          ,name:"chaxunNO",
          component:NO
      },
      {
          path:'/register',
          name:'register',
          component:Register
      },
      {
          path:'/fnde',
          name:'fnde',
          component:Fnde
      },
      {
          path:'/mian',
          name:'mian',
          component:Mian,
          meta: { requiresAuth: true },
          children:[
              {
                  path:'chaxun',
                  name:"chaxun",
                  component:Chaxun
                  , meta: { requiresAuth: true },
              },{
                  path:'me',
                  name:'me',
                  component:Me,
                  meta: { requiresAuth: true },
              },{
                  path:'report',
                  name:'report',
                  component:Report,
                  meta: { requiresAuth: true },
              },
          ]
      },
      {
        path:'/pinpai',
          name:'pinpai',
          component:Pinpai,

      },
      {
          path:'/remark',
          name:'remark',
          component:Remark
      },
    {
      path: '/login',
      name: 'Hello',
      component: HelloWorld
    },
      {
      path: '*',
          name: 'Hello',
          component: HelloWorld

    }
  ]
})
